package com.example.sale.Service.imply;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.sale.Mapper.PaymentMapper;
import com.example.sale.Service.IPaymentService;
import com.example.sale.True.Payment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class PaymentService extends ServiceImpl<PaymentMapper, Payment> implements IPaymentService {
    @Autowired
    private PaymentMapper paymentMapper;
    @Override
    public Integer SumPayment() {
        Integer SumPrice =paymentMapper.countSumPrice();
        return SumPrice;
    }

    @Override
    public Integer MaxPayment() {
         Integer MaxPrice = paymentMapper.countMaxPrice();
         return MaxPrice;
    }

    @Override
    public Integer MinPayment() {
        Integer MinPrice = paymentMapper.countMinPrice();
        return MinPrice;
    }

    @Override
    public Integer AvgPayment() {
        Integer AvgPrice = paymentMapper.countAvgPrice();
        return  AvgPrice;
    }
}
